package indi.zn.commons.easiness;

import java.util.function.BiConsumer;
import java.util.function.Consumer;

public class Loops {

	public static void  times(Integer time,Consumer<Integer> loop) {
		
		for (int i = 0; i <time; i++) {
		
			loop.accept(i);
		
		}
		
	}
	
	public static void  times(Long time,Consumer<Long> loop) {
		
		for (long i = 0; i <time; i++) {
			
			loop.accept(i);
		
		}
		
	}	
	
	public static void  times(Object[] objs,BiConsumer<Object,Integer> loop) {
		
		for (int i = 0; i <objs.length; i++) {
		
			loop.accept(objs[i],i);
		
		}
		
	}
		
	
}
